package com.vencent.spring.model;

import java.util.Date;

/**
 * maybe I forget the final keywords,so review it.
 * final means what This is not to be changed "or" final;
 * it can roles in not abstract's class, method, Class member variable.
 * when program needs designing or effective, you can use this keywords.
 * final aiming at:
 * class : if the class is modified by final, then the method of this class will be defaultly is final.
 * method : this method will have better efficiency,  and others child class can't modify this method.
 * field : can't be again assignment . even if you assigns null, then it alse can't be modify.
 * tip : the final can role in the container. the container's memory address can't be modify, but context in the container can be modify.
 * @author wbw
 *
 */
public class Spittle {
	
	private final Long id;
	private final String message;
	private final Date time;
	private Double latitude;
	private Double longtitude;
	
	public Spittle(String message, Date time){
		this(message, time, null, null);
	}
	
	public Spittle(String message, Date time, Double latitude, Double longtitude) {
		super();
		this.id = null;
		this.message = message;
		this.time = time;
		this.latitude = latitude;
		this.longtitude = longtitude;
	}

	public Double getLatitude() {
		return latitude;
	}

	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}

	public Double getLongtitude() {
		return longtitude;
	}

	public void setLongtitude(Double longtitude) {
		this.longtitude = longtitude;
	}

	public Long getId() {
		return id;
	}

	public String getMessage() {
		return message;
	}

	public Date getTime() {
		return time;
	}
	
	/*public boolean equals(Object that){
		return EqualsBuilder.reflectionEquals(this, that, "id", "time");
	}
	
	public int hashCode(){
		return HashCodeBuilder.reflectionHashCode(this, "id", "time");
	}*/
	
}
